package miru.epson.common;

import java.util.HashMap;

public class CommonFunc {
	public static int MM2Pixel(int x_mm, int Resolution)
	{
		return (int)((float)x_mm/25.4f*Resolution);
	}
	
	public static int MM2PixelX(long x_mm, int Resolution){
		return (int)((float)x_mm / 25.4f * Resolution);
	}
	
	public static int MM2PixelY(long x_mm, int Resolution)
	{
		return (int)((float)x_mm /25.4f * Resolution);
	}


	public static int Pixel2MM(long x_px, int Resolution)
	{
		return (int)((float)x_px * 25.4f / Resolution);
	}
	
}
